home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 98
/
Skunkware 98.iso
/
src
/
interp
/
tclStruct1.2.tar.gz
/
tclStruct1.2.tar
/
tclStruct1.2
/
Makefile.in
< prev
next >
Wrap
Makefile
|
1995-09-15
|
10KB
|
323 lines
#
# This file is a Makefile for tclStruct. If it has the name "Makefile.in"
# then it is a template for a Makefile; to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
# @(#) Makefile.in 1.3 95/09/15 12:21:06
#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
# the configuration script).
#----------------------------------------------------------------
# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix). The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.
prefix = @prefix@
exec_prefix = @exec_prefix@
# The following definition can be set to non-null for special systems
# like AFS with replication. It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time. INSTALL_ROOT is prepended to $prefix and $exec_prefix
# when installing files.
INSTALL_ROOT =
# Directory from which applications will reference the library of tclStruct
# scripts (note: this directory is not hard-coded into the binary)
STRUCT_LIBRARY = $(prefix)/lib/tclstruct
# Path name to use when installing library scripts:
SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(STRUCT_LIBRARY)
# Directory in which to install the archive libtclstruct.a:
LIB_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/lib
# Directory in which to install the program tclsh:
BIN_INSTALL_DIR = $(INSTALL_ROOT)$(exec_prefix)/bin
# Directory in which to install the include file tclStruct.h:
INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/include
# Top-level directory in which to install manual entries:
MAN_INSTALL_DIR = $(INSTALL_ROOT)$(prefix)/man
# Directory in which to install manual entry for tclsh:
MAN1_INSTALL_DIR = $(MAN_INSTALL_DIR)/man1
# Directory in which to install manual entries for Tcl's C library
# procedures:
MAN3_INSTALL_DIR = $(MAN_INSTALL_DIR)/man3
# Directory in which to install manual entries for the built-in
# Tcl commands:
MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann
# Which version of Tcl to use and/or link against.
TCLSH = @TCLSH@
TCLLIBRARY = @TCLLIBRARY@
# Additional libraries to use when linking. The "LIBS" part will be
# replaced (or has already been replaced) with relevant libraries as
# determined by the configure script.
AC_LIBS = @LIBS@
MATH_LIBS = @MATH_LIBS@
SYSLIBS = $(TCLLIBRARY) $(MATH_LIBS) $(AC_LIBS) $(DL_LIBS)
# To change the compiler switches, for example to change from -O
# to -g, change the following line:
CCOPTIONS = @CCOPTIONS@
CDEBUGFLAGS = -DDEBUG=0 -DSTRUCT_MAGIC
# To disable ANSI-C procedure prototypes reverse the comment characters
# on the following lines:
PROTO_FLAGS =
#PROTO_FLAGS = -DNO_PROTOTYPE
# To enable memory debugging reverse the comment characters on the following
# lines. Warning: if you enable memory debugging, you must do it
# *everywhere*, including all the code that calls Tcl, and you must use
# ckalloc and ckfree everywhere instead of malloc and free.
MEM_DEBUG_FLAGS =
#MEM_DEBUG_FLAGS = -DTCL_MEM_DEBUG
# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL = /bin/sh
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
#----------------------------------------------------------------
# The symbols below provide support for dynamic loading and shared
# libraries. The values of the symbols are normally set by the
# configure script. You shouldn't normally need to modify any of
# these definitions by hand.
#----------------------------------------------------------------
# Flags to pass to cc when compiling the components of a shared library:
SHLIB_CFLAGS = @SHLIB_CFLAGS@
# Base command to use for combining object files into a shared library:
SHLIB_LD = @SHLIB_LD@
# Suffix to use for the name of the shared library. An empty string
# means we don't know how to use shared libraries on this platform.
SHLIB_SUFFIX = @SHLIB_SUFFIX@
# Suffix to use for _any_ library. Defaults to ".a".
LIB_SUFFIX = @LIB_SUFFIX@
# Library file(s) to include in tclsh and other base applications
# in order to provide facilities needed for dynamic linking.
DL_LIBS = @DL_LIBS@
# Flags to pass to the compiler when linking object files into
# an executable tclsh or tcltest binary.
LD_FLAGS = @LD_FLAGS@
#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in. You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------
COMPAT_OBJS = @LIBOBJS@
AC_CFLAGS = @CFLAGS@
AC_DEFINES = @DEFS@
AC_LDFLAGS = @LDFLAGS@
AC_LIBS = @LIBS@
RANLIB = @RANLIB@
CC = @CC@
RM = rm -f
#----------------------------------------------------------------
# The information below should be usable as is. The configure
# script won't modify it and you shouldn't need to modify it
# either.
#----------------------------------------------------------------
# Leave alone. Will be overridden for shared libraries
STD_DEFINES =
STD_INCLUDES = -I$(INCLUDE_INSTALL_DIR)
ALLINCLUDES = $(STD_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(CDEBUGFLAGS) \
$(PROTO_DEFINES) $(DEFINES) \
$(AC_DEFINES) $(MATH_FLAGS) $(GENERIC_FLAGS) \
$(PROTO_FLAGS) $(MEM_DEBUG_FLAGS)
LINTFLAGS = $(LINTOPTS) -DLINT $(ALLINCLUDES)
CFLAGS = $(CCOPTIONS) $(AC_CFLAGS) $(SHLIB_CFLAGS) $(ALLDEFINES) $(CRUNFLAGS)
##SYSLIBS = $(AC_LIBS) $(DL_LIBS) -ltcl$(TCLVERSION) -lm $(DL_LIBS)
LDFLAGS = $(CFLAGS) -L$(exec_prefix)/lib
OBJSLIB = \
stAccess.o \
stCopy.o \
stDebug.o \
stInfo.o \
stInit.o \
stLookup.o \
stObject.o \
stRead.o \
stTrace.o \
stTrNum.o \
stTrStr.o \
stTypeDef.o \
stTypes.o
OBJECTS = $(OBJSLIB) tclAppInit.o
LIB_TARGET= libtclStruct$(LIB_SUFFIX)
ALL_TARGETS = tclstruct $(LIB_TARGET) library/tclIndex
all: $(ALL_TARGETS)
# Building an archive library
libtclStruct.a: $(OBJSLIB)
$(RM) $@
$(AR) cr $@ $(OBJSLIB)
$(RANLIB) $@
# Building a (dynamically) loadable/shared library
libtclStruct$(SHLIB_SUFFIX): $(OBJSLIB)
$(SHLIB_LD) -o libtclStruct$(SHLIB_SUFFIX) $(OBJSLIB)
# This executable is statically linked with the tclStruct package
# and is used for testing. It is not (normally) installed.
tclstruct: $(OBJECTS)
LD_RUN_PATH=$(LIB_INSTALL_DIR) $(CC) -o $@ $(LDFLAGS) $(OBJECTS) $(SYSLIBS)
# Create the index of auxilary functions
library/tclIndex: library
echo "auto_mkindex library *.tcl" | $(TCLSH)
lint:
lint $(LINTFLAGS) $(ALLINCLUDES) tclAppInit.c $(OBJSLIB:.o=.c) $(SYSLIBS)
# There are two ways to run the tests that are part of this package.
# The first (and default) method is to run the tests using the executable
# we create expressly for this purpose. The second (and prefered) method
# is to dynamically load this extension into the Tcl interpreter.
test: tclstruct
(cd tests; ../tclstruct all)
test-dl: $(LIB_TARGET)
(cd tests; LD_LIBRARY_PATH=`pwd`:$(LIB_INSTALL_DIR) $(TCLSH) all)
install: install-binaries install-libraries install-man
install-binaries:
@for i in $(LIB_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
mkdir $$i; chmod 755 $$i ; \
fi; \
done;
@echo "Installing $(LIB_TARGET)
@$(INSTALL_DATA) $(LIB_TARGET) $(LIB_INSTALL_DIR)
install-libraries:
@for i in $(INCLUDE_INSTALL_DIR) $(SCRIPT_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
mkdir $$i; chmod 755 $$i ; \
fi; \
done;
cp tclStruct.h $(INCLUDE_INSTALL_DIR)
cp library/*.tcl library/tclIndex $(SCRIPT_INSTALL_DIR)
@echo "Installing tclStruct.h"
@$(INSTALL_DATA) tclStruct.h $(INCLUDE_INSTALL_DIR)
@for i in library/*.tcl library/tclIndex ; \
do \
echo "Installing $$i"; \
$(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
done;
install-man:
@for i in $(MAN_INSTALL_DIR) $(MAN1_INSTALL_DIR) $(MAN3_INSTALL_DIR) $(MANN_INSTALL_DIR) ; \
do \
if [ ! -d $$i ] ; then \
echo "Making directory $$i"; \
mkdir $$i; \
chmod 755 $$i; \
else true; \
fi; \
done;
@cd doc; for i in *.1; \
do \
echo "Installing doc/$$i"; \
$(RM) $(MAN1_INSTALL_DIR)/$$i; \
sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
$$i > $(MAN1_INSTALL_DIR)/$$i; \
chmod 444 $(MAN1_INSTALL_DIR)/$$i; \
done;
@cd doc; for i in *.3; \
do \
echo "Installing doc/$$i"; \
$(RM) $(MAN3_INSTALL_DIR)/$$i; \
sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
$$i > $(MAN3_INSTALL_DIR)/$$i; \
chmod 444 $(MAN3_INSTALL_DIR)/$$i; \
done;
@cd doc; for i in *.n; \
do \
echo "Installing doc/$$i"; \
$(RM) $(MANN_INSTALL_DIR)/$$i; \
sed -e '/man\.macros/r man.macros' -e '/man\.macros/d' \
$$i > $(MANN_INSTALL_DIR)/$$i; \
chmod 444 $(MANN_INSTALL_DIR)/$$i; \
done;
Makefile: Makefile.in
$(SHELL) config.status
depend:
makedepend $(ALLDEFINES) *.c
clean:
$(RM) $(OBJECTS) core $(ALL_TARGETS) libtclStruct.*
distclean: clean
$(RM) Makefile config.status config.cache
#
# Target to make sure that only symbols with "Tcl" prefixes are
# exported.
#
checkexports: $(LIB_TARGET)
-nm -p $(LIB_TARGET) | awk '$$2 ~ /[TDB]/ { print $$3 }' | sort -n | grep -v '^[Ss]struct'
#
# Target to create a proper Tcl distribution from information in the
# master source directory. DISTDIR must be defined to indicate where
# to put the distribution.
#
configure: configure.in
autoconf
dist: configure
./BuildPkg
# DO NOT DELETE THIS LINE -- make depend depends on it.